import request from '@/config/axios'

export interface EnrollClueVO {
  id: number
  userId: number
  clientName: string
  clientPhone: string
  clientAddress: string
  clientRemark: string
  isRegister: boolean
}

// 查询客户报名线索列表
export const getEnrollCluePage = async (params) => {
  return await request.get({ url: `/train/enroll-clue/page`, params })
}

// 查询客户报名线索详情
export const getEnrollClue = async (id: number) => {
  return await request.get({ url: `/train/enroll-clue/get?id=` + id })
}

// 新增客户报名线索
export const createEnrollClue = async (data: EnrollClueVO) => {
  return await request.post({ url: `/train/enroll-clue/create`, data })
}

// 修改客户报名线索
export const updateEnrollClue = async (data: EnrollClueVO) => {
  return await request.put({ url: `/train/enroll-clue/update`, data })
}

// 删除客户报名线索
export const deleteEnrollClue = async (id: number) => {
  return await request.delete({ url: `/train/enroll-clue/delete?id=` + id })
}

// 导出客户报名线索 Excel
export const exportEnrollClue = async (params) => {
  return await request.download({ url: `/train/enroll-clue/export-excel`, params })
}
